public class Television implements ComputerWeight {
    public double computeWeight() {
        double weight = 5000;
        return weight;
    }

}
class Computer implements ComputerWeight {
    public double computeWeight(){
        double weight = 4000;
        return weight;
    }
}
class WashMchine implements ComputerWeight{
    public double computeWeight(){
        double weight = 7000;
        return weight;
    }
}
class Car{
    ComputerWeight[]goods;
    double totalWeights=0;
    Car(ComputerWeight[]goods){
        this.goods = goods;
    }
    public double getTotalWeight(){
        totalWeights = 0;
        for(int i = 0;i<goods.length;i++){
            totalWeights+=goods[i].computeWeight();
        }
        return totalWeights;
    }
}

